backtracking_retractall([H|T]):- retract(H), backtracking_retractallr(T).
backtracking_retractallr([H|T]):- retract(H), backtracking_retractallr(T).
backtracking_retractallr([]).
backtracking_retractall([H|T]):- asserta(H), backtracking_retractalla(T).
backtracking_retractalla([H|T]):- asserta(H), backtracking_retractalla(T).
backtracking_retractalla([]) :- fail.


%backtracking_retractall(X):- asserta(X), fail.

cloth(b, a).
cloth(b, c).

%findall(cloth(A, B), cloth(A, B), L), backtracking_retractall(L).